<div class="form-group" >
  <label class="col-sm-2 control-label">
    姓名<span style="color: red; margin-left: 5px;">*</span>
    <!--<br><span style="font-size:12px;color:gray;">填后不能修改</span>-->
  </label>
  <div class="col-sm-10" ng-class="{'has-success':!userForm.name.$pristine && userForm.name.$valid,'has-error':
(!userForm.name.$pristine || userForm.name.$touched) && userForm.name.$invalid}">
    <input type="text" name="name" class="form-control"
           ng-model="user.name"
           placeholder="填后不能修改"
           ng-minlength="{{minlength}}"
           ng-maxlength="{{maxlength}}" required/>
    <!--<span class="glyphicon glyphicon-ok form-control-feedback" style="padding:0 -10px; " ng-if="userForm.name.$dirty&&userForm.name.$valid"></span>-->
    <!--<span class="glyphicon glyphicon-remove form-control-feedback" ng-if="userForm.name.$dirty&&userForm.name.$invalid"></span>-->
    <div class="help-block" ng-messages="userForm.name.$error" ng-if="userForm.name.$touched">
      <p ng-message="minlength">用户名最小长度为{{minlength}}</p>
      <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p>
      <p ng-message="required">用户名必填</p>
    </div>
  </div>

</div>
